home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat4 / capabilities.z / capabilities
Encoding:
Text File  |  2002-10-03  |  13.6 KB  |  397 lines

  1.  
  2.  
  3.  
  4. ccccaaaappppaaaabbbbiiiilllliiiittttiiiieeeessss((((4444))))                                                ccccaaaappppaaaabbbbiiiilllliiiittttiiiieeeessss((((4444))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      capabilities - capability mechanism
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ccccaaaappppaaaabbbbiiiilllliiiittttyyyy....hhhh>>>>
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      The capability mechanism provides fine grained control over the
  16.      privileges of a process.  As a process attribute, a capability allows the
  17.      process to perform a specific set of restricted operations, without
  18.      granting general override of the system's protection scheme.  A process
  19.      can possess multiple capabilities.  Collectively, all defined
  20.      capabilities comprise the set of abilities that are traditionally
  21.      associated with the root user.
  22.  
  23.      Defined capabilities are:
  24.  
  25.      CAP_ACCT_MGT
  26.           Privilege to use accounting setup _aaaa_cccc_cccc_tttt(2) system call and
  27.           acctctl(3c) library call.
  28.  
  29.      CAP_AUDIT_CONTROL
  30.           Privilege to manage the system audit trail (_ssss_aaaa_tttt______rrrr_eeee_aaaa_dddd(2) and
  31.           _ssss_aaaa_tttt______wwww_rrrr_iiii_tttt_eeee(2) system calls).
  32.  
  33.      CAP_AUDIT_WRITE
  34.           Privilege to write to the system audit trail, _ssss_aaaa_tttt______wwww_rrrr_iiii_tttt_eeee(2) system
  35.           call.
  36.  
  37.      CAP_CHOWN
  38.           Privilege to change the owner of a file not owned by the process
  39.           when the system is configured with _POSIX_CHOWN_RESTRICTED enabled.
  40.  
  41.      CAP_CHROOT
  42.           Privilege to use the _cccc_hhhh_rrrr_oooo_oooo_tttt(2) system call.
  43.  
  44.      CAP_DAC_EXECUTE
  45.           Privilege to execute a file when the permissions or Access Control
  46.           List prohibit it.
  47.  
  48.      CAP_DAC_READ_SEARCH
  49.           Privilege to read a file or search a directory when the permissions
  50.           or Access Control List prohibit it.
  51.  
  52.      CAP_DAC_WRITE
  53.           Privilege to write a file or update a directory when the permissions
  54.           or Access Control List prohibit it.
  55.  
  56.      CAP_DEVICE_MGT
  57.           Privilege to issue restricted device management calls and _iiii_oooo_cccc_tttt_llll
  58.           actions.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ccccaaaappppaaaabbbbiiiilllliiiittttiiiieeeessss((((4444))))                                                ccccaaaappppaaaabbbbiiiilllliiiittttiiiieeeessss((((4444))))
  71.  
  72.  
  73.  
  74.      CAP_FOWNER
  75.           Privilege to operate on a file as if the process owns it (for
  76.           example, change permissions, ownership, access times, etc.).
  77.  
  78.      CAP_FSETID
  79.           Privilege to set the setuid or setgid bits of a file without being
  80.           the owner.  Also, the privilege to change the owner of a setuid or
  81.           setgid file.
  82.  
  83.      CAP_INF_DOWNGRADE
  84.           Not supported, silently ignored.
  85.  
  86.      CAP_INF_NOFLOAT_OBJ
  87.           Not supported, silently ignored.
  88.  
  89.      CAP_INF_NOFLOAT_SUBJ
  90.           Not supported, silently ignored.
  91.  
  92.      CAP_INF_RELABEL_SUBJ
  93.           Not supported, silently ignored.
  94.  
  95.      CAP_INF_UPGRADE
  96.           Not supported, silently ignored.
  97.  
  98.      CAP_KILL
  99.           Privilege to send a signal to a process that is not owned by the
  100.           sender.  Also, privilege to use process synchronization calls
  101.           (_pppp_rrrr_oooo_cccc_bbbb_llll_kkkk) to a process.
  102.  
  103.      CAP_LINK_DIR
  104.           Not supported.
  105.  
  106.      CAP_MAC_DOWNGRADE
  107.           Privilege to change the MAC label of an object to a value that is
  108.           dominated by the previous label.  (Only on systems with MAC
  109.           enabled.)
  110.  
  111.      CAP_MAC_MLD
  112.           Allows a process to change its own MAC label to a moldy label.  A
  113.           process with a moldy label can view the hidden directory structure
  114.           of a multilevel directory.  (Only on systems with MAC enabled.)
  115.  
  116.      CAP_MAC_READ
  117.           Privilege to read information whose MAC label dominates that of the
  118.           reader.  (Only on systems with MAC enabled.)
  119.  
  120.      CAP_MAC_RELABEL_OPEN
  121.           Privilege to change the MAC label of an open file.  (Only on systems
  122.           with MAC enabled.)
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ccccaaaappppaaaabbbbiiiilllliiiittttiiiieeeessss((((4444))))                                                ccccaaaappppaaaabbbbiiiilllliiiittttiiiieeeessss((((4444))))
  137.  
  138.  
  139.  
  140.      CAP_MAC_RELABEL_SUBJ
  141.           Allows a process to change its own MAC label.  (Only on systems with
  142.           MAC enabled.)
  143.  
  144.      CAP_MAC_UPGRADE
  145.           Privilege to change the MAC label of an object to a value that
  146.           dominates the previous label.  (Only on systems with MAC enabled.)
  147.  
  148.      CAP_MAC_WRITE
  149.           Privilege to write information whose MAC label does not equal that
  150.           of the writer.  (Only on systems with MAC enabled.)
  151.  
  152.      CAP_MEMORY_MGT
  153.           Privilege to issue restricted memory management calls, primarily
  154.           memory locking.
  155.  
  156.      CAP_MKNOD
  157.           Alias for CAP_DEVICE_MGT.
  158.  
  159.      CAP_MOUNT_MGT
  160.           Privilege to use the _mmmm_oooo_uuuu_nnnn_tttt(2) and _uuuu_nnnn_mmmm_oooo_uuuu_nnnn_tttt(2) system calls.
  161.  
  162.      CAP_NETWORK_MGT
  163.           Privilege to issue restricted networking calls (for example, setting
  164.           the network interface MAC address, network interface device
  165.           management, etc.).
  166.  
  167.      CAP_NVRAM_MGT
  168.           Alias for CAP_SYSINFO_MGT.
  169.  
  170.      CAP_PRIV_PORT
  171.           Privilege to open a _ssss_oooo_cccc_kkkk_eeee_tttt on a privileged TCP port.
  172.  
  173.      CAP_PROC_MGT
  174.           Privilege to issue restricted process management calls.
  175.  
  176.      CAP_QUOTA_MGT
  177.           Privilege to issue restricted quota management calls.
  178.  
  179.      CAP_SCHED_MGT
  180.           Privilege to issue restricted scheduler calls, such as the real time
  181.           scheduler interfaces.
  182.  
  183.      CAP_SETFCAP
  184.           Privilege to change the capability sets of a file.
  185.  
  186.      CAP_SETGID
  187.           Allows a process to change its real GID, effective GID, saved GID,
  188.           and process group ID.
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ccccaaaappppaaaabbbbiiiilllliiiittttiiiieeeessss((((4444))))                                                ccccaaaappppaaaabbbbiiiilllliiiittttiiiieeeessss((((4444))))
  203.  
  204.  
  205.  
  206.      CAP_SETPCAP
  207.           Allows a process to change its capability sets.
  208.  
  209.      CAP_SETUID
  210.           Allows a process to change its real, effective and saved UIDs.
  211.  
  212.      CAP_SHUTDOWN
  213.           Privilege to shutdown or reboot the system.  This capability alone
  214.           may be insufficient to perform the /etc/shutdown operation.
  215.  
  216.      CAP_SIGMASK
  217.           Not supported, silently ignored.
  218.  
  219.      CAP_STREAMS_MGT
  220.           Privilege to use restricted STREAMS calls and operations.
  221.  
  222.      CAP_SWAP_MGT
  223.           Privilege to use the _ssss_wwww_aaaa_pppp(2) system call.
  224.  
  225.      CAP_SYSINFO_MGT
  226.           Privilege to set system information (for example, _hhhh_oooo_ssss_tttt_nnnn_aaaa_mmmm_eeee values,
  227.           NVRAM values, etc.).
  228.  
  229.      CAP_SVIPC_MGT
  230.           Not supported, silently ignored.
  231.  
  232.      CAP_TIME_MGT
  233.           Privilege to set the system time.
  234.  
  235.      CAP_XTCB
  236.           Identifies a trusted client to the X server (that is trusted patth).
  237.  
  238.      A process has three, possibly empty, sets of capabilities.  The permitted
  239.      capability set is the maximum set of capabilities for the process.  The
  240.      effective capability set contains those capabilities that are currently
  241.      active for the process.  The inherited capability set contains those
  242.      capabilities that the process may pass to the next process image across
  243.      _eeee_xxxx_eeee_cccc(2).
  244.  
  245.      Only capabilities in a process' effective capability set allow the
  246.      process to perform restricted operations.  A process may use capability
  247.      management functions to add or remove capabilities from its effective
  248.      capability set.  However the capabilities that a process can make
  249.      effective are limited to those that exist in its permitted capability
  250.      set.
  251.  
  252.      Only capabilities in the process' inherited capability set can be passed
  253.      across _eeee_xxxx_eeee_cccc(2).
  254.  
  255.      Capabilities are also associated with files.  There may or may not be a
  256.      capability set associated with a specific file.  If a file has no
  257.      capability set, execution of this file through an _eeee_xxxx_eeee_cccc(2) will leave the
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. ccccaaaappppaaaabbbbiiiilllliiiittttiiiieeeessss((((4444))))                                                ccccaaaappppaaaabbbbiiiilllliiiittttiiiieeeessss((((4444))))
  269.  
  270.  
  271.  
  272.      process' capability set unchanged.  If a file has a capability set,
  273.      execution of file will affect the process' capability set in the
  274.      following way: a file's inherited capability set further constrains the
  275.      process inherited capabilities that are passed from one process image to
  276.      another. The file's permitted capability set contains the capabilities
  277.      that are unconditionally permitted to a process upon execution of that
  278.      file.  The file's effective capabilities are the capabilities that become
  279.      immediately active for the process upon execution of the file.
  280.  
  281.      More precisely described, the process capability assignment algorithm is:
  282.  
  283.               I-proc-new = I-proc-old & I-file
  284.               P-proc-new = P-file | (I-proc-new & P-proc-old)
  285.               E-proc-new = P-proc-new & E-file
  286.  
  287.  
  288.      File capabilities are supported only on XFS filesystems.
  289.  
  290.      At the interface to the library routines, the capability sets are
  291.      represented in a _s_t_r_u_c_t _c_a_p__s_e_t which is defined in <_s_y_s/_c_a_p_a_b_i_l_i_t_y._h>.
  292.  
  293.               typedef __uint64_t cap_value_t;
  294.  
  295.               struct cap_set {
  296.                    cap_value_t     cap_effective;  /* use in capability checks */
  297.                    cap_value_t     cap_permitted;  /* combined with file attrs */
  298.                    cap_value_t     cap_inheritable;/* pass through exec */
  299.               };
  300.               typedef struct cap_set cap_set_t;
  301.               typedef struct cap_set * cap_t;
  302.  
  303.  
  304.      Macros in _<<<<_ssss_yyyy_ssss_////_cccc_aaaa_pppp_aaaa_bbbb_iiii_llll_iiii_tttt_yyyy_...._hhhh_>>>> may be used to query, set or examine the
  305.      capability sets.
  306.  
  307. EEEEXXXXTTTTEEEERRRRNNNNAAAALLLL RRRREEEEPPPPRRRREEEESSSSEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  308.      The routines _cccc_aaaa_pppp______ffff_rrrr_oooo_mmmm______tttt_eeee_xxxx_tttt(3c) and _cccc_aaaa_pppp______tttt_oooo______tttt_eeee_xxxx_tttt(3c) do the conversion
  309.      between the internal structures and the external text form of
  310.      capabilities.  The output of _cccc_aaaa_pppp______tttt_oooo______tttt_eeee_xxxx_tttt may be used in _cccc_aaaa_pppp______ffff_rrrr_oooo_mmmm______tttt_eeee_xxxx_tttt to
  311.      recreate the original capability sets.
  312.  
  313.      The text representation of capability sets is a string, which consists of
  314.      one or more capability lists.  Each capability list has the form:
  315.  
  316.           capname[,capname]OF
  317.  
  318.      where capname is a defined capability name (described above).  The name
  319.      ALL indicates all capabilities.
  320.  
  321.      F is a sequence of one or more flags chosen from "e", "i", "p" indicating
  322.      which capability sets are to be affected. "e" indicates the effective
  323.      capability set, "p" indicates the permitted capability set, and "i"
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. ccccaaaappppaaaabbbbiiiilllliiiittttiiiieeeessss((((4444))))                                                ccccaaaappppaaaabbbbiiiilllliiiittttiiiieeeessss((((4444))))
  335.  
  336.  
  337.  
  338.      indicates the inherited capability set.
  339.  
  340.      O is the operation chosen from "=", "+", "-", indicating to initialize,
  341.      add, or delete the specified capabilities in the affected capability
  342.      sets.
  343.  
  344.      The capability lists are interpreted sequentially.
  345.  
  346.      All characters from the symbol "#" to the end of the line are interpreted
  347.      as comments and are ignored.
  348.  
  349. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  350.      chcap(1), cap_from_text(3C), cap_get_proc(3C), cap_set_proc(3C),
  351.      cap_to_text(3C), capability(4), dominance(5).
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.